import requests

session = requests.Session()

res = session.request(
    url="http://shop-xo.hctestedu.com/index.php?s=api/user/login",
    method="post",
    params={"application": "app", "application_client_type": "weixin"},
    data={"accounts": "huace_xm", "pwd": "123456", "type": "username"}
)
print(res.json()["data"]["token"])

res1 = session.post("http://shop-xo.hctestedu.com/index.php?s=api/message/index", params={"page": 1})
print(res1.json())
